<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */ 
		
if(isset($_GET['id'])){
    $_conn=mysql_connect('localhost','root','') or die(mysql_errno());
   mysql_select_db('new',$_conn) or die(mysql_errno());
   mysql_query("SET NAMES UTF8") or die(mysql_errno());
   mysql_query("DELETE FROM list WHERE id='{$_GET['id']}' LIMIT 1") or die(mysql_error());
   if(mysql_affected_rows()==1){
      echo "<script type='text/javascript'>location.href='look.php';</script>";
   }else{
       echo "<script type='text/javascript'>alert('删除失败!');history.back();</script>";
   }
}else{
    echo'非法用户!';
}

?>

